from django.template import RequestContext,Template
from django.http import HttpResponse
template = """
{%load ham%}
<html>
<head>
<title>{{title}}</title>
</head>
<body>
<h1>{{page}}</h1>
<a href="{%href ""%}">Me</a></br>
<a href="{%href "" page=10%}">Me,page 10</a></br>
<a href="{%href "" page=20%}">Me,page 20</a></br>
<a href="{%href "ham.test.john" page=*%}">John, same page</a></br>
<a href="{%href "ham.test.frank" page=page%}">Frank, same page</a></br>
<a href="{%href "ham.test.john" page=30%}">John, page 30</a></br>
<a href="{%href "ham.test.frank" page=*,page=40%}">Frank, page 40</a></br>
</body>
</html>
"""

def frank(request,page):
	page = int(page)
	c = RequestContext(request)
	c['page'] = page
	c['title'] = "Frank"
	return HttpResponse(Template(template).render(c))
def john(request,page):
	page = int(page)
	c = RequestContext(request)
	c['page'] = page
	c['title'] = "john"
	return HttpResponse(Template(template).render(c))
